<template>
  <div id="app">
    <div class="container">
      <div class="row">
      <div class="col-xs-offset-2 col-xs-8">
        <div class="page-header">
          <h2>Router Basic - 01</h2>
        </div>
      </div>
    </div>
    <div class="row">
      <div class="col-xs-2 col-xs-offset-2">
        <div class="list-group">
          <!-- 指定路由链接 -->
          <router-link  name="home" to="/home" class="list-group-item">Home</router-link>
          <router-link  name="about" to="/about" class="list-group-item">About</router-link>
          <!-- <a href="/about" class="list-group-item router-link-exact-active router-link-active"></a>
          <a href="/home" class="list-group-item">Home</a> -->
        </div>
        <div class="col-xs-6">
          <div class="panel">
            <div class="panel-body">
              <!-- 显示当前路由组件 -->
              <router-view></router-view>
            </div>
          </div>
        </div>
      </div>
    </div>
    </div>
    <home></home>
    <about></about>
  </div>
</template>

<script>
import Home from './pages/Home.vue'
import About from './pages/About.vue'

export default {
  name: 'App',
  components: {
    Home,
    About
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
